import requestInstance from '/utils/http.js'
/**
 * @description 订单详情
 * @returns {Promise}
 */
export const  reqOrderDetail = ()=>{
	return requestInstance.get('/order/trade')
}
/**
 * @description 订单地址
 * @returns {Promise}
 */
export const  reqOrderAddress = ()=>{
	return requestInstance.get('/userAddress/getOrderAddress')
}
/**
 * @description 立即购买
 * @param {Object} param {goodsId:商品ID,blessing:祝福语}
 * @returns {Promise}
 */
export const  reqBuyNow = ({goodsId,...data})=>{
	return requestInstance.get(`/order/buy/${goodsId}`,data)
}
/**
 * @description 提交订单
 * @returns {Promise}
 */
export const  reqSubmitOrder = (data)=>{
	return requestInstance.post('/order/submitOrder',data)
}
/**
 * @description 微信预支付信息
 * @returns {Promise}
 */
export const  reqBeforePayInfo = (orderNo)=>{
	return requestInstance.get(`/webChat/createJsapi/${orderNo}`)
}
/**
 * @description 微信支付状态查询
 * @returns {Promise}
 */
export const  reqWechatPayStatus = (orderNo)=>{
	return requestInstance.get(`/webChat/queryPayStatus/${orderNo}`)
}